package com.woniuxy.aspect;

import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

@Aspect
@Component
public class MyAspect {
    @Pointcut("execution(* com.woniuxy.service.impl.*.*(..))")
    public void mypc(){}
    @Before("mypc()")
    public void check(){
        System.out.println("权限检查");
    }
    @AfterReturning("mypc()")
    public void log(){
        System.out.println("日志记录");
    }
}
